package buildIn.observer;

import java.util.Observable;

/**
 * Created with IntelliJ IDEA.
 * User: Alexander
 * Date: 11.07.12
 * Time: 13:59
 * To change this template use File | Settings | File Templates.
 */
public class FirstSubject extends Observable {

    private float temperature;
    private float humidity;
    private float pressure;

    public FirstSubject(){}

    public float getTemperature(){
        return this.temperature;
    }

    public float getHumidity(){
        return this.humidity;
    }

    public float getPressure(){
        return this.pressure;
    }

    public void setMeasurements(float temp, float hum, float press){
        this.temperature = temp;
        this.humidity = hum;
        this.pressure = press;
        measurementsChanged();

    }

    public void measurementsChanged(){
        setChanged();
        notifyObservers();
    }

}
